﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ProgressBarTest="clr-namespace:ProgressBarTest" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
	<!-- Resource dictionary entries should be defined here. -->
	<!-- Resource dictionary entries should be defined here. -->
	<Style x:Key="PintGlassProgressBarStyle"
		TargetType="{x:Type ProgressBarTest:CircularProgressBar}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ProgressBarTest:CircularProgressBar}">
					<Grid SnapsToDevicePixels="true"
						DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ProgressBarTest:CircularProgressBar}}}">
						<Path Fill="#FFBABABA">
							<Path.Data>
								<!--
								<PathGeometry>
									<PathFigure StartPoint="0,0">
										<BezierSegment Point1="-6,63" Point2="15,69" Point3="5,120" />
										<BezierSegment Point1="6,120" Point2="67,120" Point3="54,120" />
										<BezierSegment Point1="44,69" Point2="65,63" Point3="60,0" />
									</PathFigure>
								</PathGeometry>
								-->
								<PathGeometry>
									<PathFigure StartPoint="47,15">
										<BezierSegment Point1="41,78" Point2="61,84" Point3="52,135" />
										<BezierSegment Point1="53,135" Point2="114,135" Point3="101,135" />
										<BezierSegment Point1="91,84" Point2="112,78" Point3="107,15" />
									</PathFigure>
								</PathGeometry>
							</Path.Data>
						</Path>
						<Path Fill="#FF01D328">
							<Path.Data>
								<PathGeometry>
									<PathFigure StartPoint="47,15">
										<BezierSegment Point1="41,78" Point2="61,84" Point3="52,135" />
										<BezierSegment Point1="53,135" Point2="114,135" Point3="101,135" />
										<BezierSegment Point1="91,84" Point2="112,78" Point3="107,15" />
									</PathFigure>
								</PathGeometry>
							</Path.Data>
							<Path.Clip>
								<PathGeometry>
									<PathFigure StartPoint="0,0">
										<LineSegment Point="0,75" />
										<LineSegment Point="75,75" />
										<LineSegment Point="{Binding ProgressPoint}" />
										<LineSegment Point="{Binding ThirdBoundingPoint}" />
										<LineSegment Point="{Binding SecondBoundingPoint}" />
										<LineSegment Point="{Binding FirstBoundingPoint}" />
									</PathFigure>
								</PathGeometry>
							</Path.Clip>
						</Path>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsIndeterminate"
							Value="true" />
						<Trigger Property="IsIndeterminate"
							Value="false" />
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>